package com.wlc.exception;

/**
 * @author 王立朝 wanglichao@champion-credit.com
 * @description 自定义异常
 * @date 2021-06-29 10:12
 */
public class MyException extends Exception {
    private int detail;
    /**
     * 用来判断用户输入的数字是否大于10，如果大于10 抛出异常
     */
    public  MyException(int number) {
        this.detail = number;
    }

    @Override
    public String toString() {
        return "MyException{" +
                "detail=" + detail +
                '}';
    }
}
